find_package(yaml-cpp REQUIRED)

add_executable(sb
    src/application.cpp
    src/App_Net_Can_Current.cpp
    src/config.cpp
)
target_include_directories(sb PRIVATE
    ${YAML_CPP_INCLUDE_DIR}
    ./include
    ../driver/include
    ../component/include
)
target_link_directories(sb PRIVATE ${YAML_CPP_LIBRARIES})
target_link_libraries(sb PRIVATE yaml-cpp modbus driver component)

add_executable(sb_a
    src/application.cpp
    src/App_Net_Can_Current_add.cpp
    src/config.cpp
)
target_include_directories(sb_a PRIVATE
    ${YAML_CPP_INCLUDE_DIR}
    ./include
    ../driver/include
    ../component/include
)
target_link_directories(sb_a PRIVATE ${YAML_CPP_LIBRARIES})
target_link_libraries(sb_a PRIVATE yaml-cpp modbus driver component)

add_executable(sb_tri
    src/application.cpp
    src/App_Net_Can_Current_tri.cpp
    src/config.cpp
)
target_include_directories(sb_tri PRIVATE
    ${YAML_CPP_INCLUDE_DIR}
    ./include
    ../driver/include
    ../component/include
)
target_link_directories(sb_tri PRIVATE ${YAML_CPP_LIBRARIES})
target_link_libraries(sb_tri PRIVATE yaml-cpp modbus driver component)